package com.aaa.ssm.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @ fileName:Result
 * @ description:
 * @ author:张圣福
 * @ createTime:2023/9/26 15:37
 * @ version:1.0.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result <T>{
    //返回码
    private Integer code;
    //返回信息提示
    private  String message;
    //返回的数据
    private  T data;
    public static <T> Result<T> success(T data) {
        Result<T> result = new Result<>();
        result.setCode(200);
        result.setMessage("Success");
        result.setData(data);
        return result;
    }
}
